<?php

namespace App\Http\Requests\Customers;

use App\Http\Requests\ApiRequest;

/**
 * @property string old_password
 * @property string password
 */
class UpdatePasswordRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'old_password'           => 'required|string|min:6',
            'password'               => 'required|confirmed|string|min:6',
            'password_confirmation'  => 'required|string|min:6',
        ];
    }
}
